# -*- coding: utf-8 -*-

def lower_upper(x):
    lst=[]
    for item in x:
        if 'A'<=item <='Z':
            lst.append(chr(ord(item)+32))
        elif 'a'<=item <='z':
            lst.append(chr(ord(item)-32))
        else:
            lst.append(item)
    return ''.join(lst)

s=input('请输入一个字符串')
new_s = lower_upper(s)
print(new_s)